.index {
  height: 100%;
  width: 100%;
  background: var(--gray-0);
  overflow-x: hidden;
  overflow-y: auto;
  .codeBox {
    position: relative;
    .copyBtn {
      position: absolute;
      top: 8px;
      right: 8px;
      padding: 8px;
      border: 1px solid rgba($color: #fff, $alpha: 0.33);
      background: rgba($color: #fff, $alpha: 0.18);
      color: rgba($color: #fff, $alpha: 0.66);
      opacity: 0;
      line-height: 1;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.3s;
    }
    &:hover {
      .copyBtn {
        opacity: 1;
      }
    }
  }
  .inlineCode {
    font-size: 12px;
    padding: 2px 4px;
    background: #f6f7f9;
    color: #d56161;
  }
  .item {
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    .bubbleWrap {
      display: inline-flex;
      align-items: center;
      max-width: 100%;
      .bubble {
        border-radius: 8px;
        padding: 0 12px;
        word-break: break-all;
        width: 100%;
        p {
          margin: 8px 0;
          line-height: 1.8;
        }
        img {
          max-width: 100%;
        }
      }
    }
    .time {
      padding: 0 6px;
      height: 20px;
      display: flex;
      align-items: center;
      font-size: 12px;
      color: var(--gray-2);
      max-width: 100%;
      overflow: hidden;
      gap: 12px;
      .state {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }
  }
  .user {
    .bubble {
      background: var(--color-primary);
      color: #fff;
    }
  }
  .chatgpt {
    .bubble {
      background: #fff;
      color: #333;
    }
    .retryAction {
      padding-left: 8px;
      &:hover {
        color: var(--color-primary);
      }
    }
  }
}

.dark {
  .inlineCode {
    background: rgba($color: #fff, $alpha: 0.08);
    color: #ff7875;
  }
  .chatgpt {
    .bubble {
      background: rgba($color: #fff, $alpha: 0.08);
      color: #fff;
    }
  }
}

